% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/colcounter_xyz.R
\name{colcounter_summary_all}
\alias{colcounter_summary_all}
\title{Summarize count (and percent) of rows with exactly (and at least) N cols >= various thresholds}
\usage{
colcounter_summary_all(x, thresholdlist, ...)
}
\arguments{
\item{x}{Data.frame or matrix of numbers to be compared to threshold value,
like percentiles for example.}

\item{thresholdlist}{vector of numeric threshold values to compare to}

\item{...}{passed to the 4 functions
like or.tied=TRUE, na.rm=TRUE, below=FALSE, one.cut.per.col=FALSE}
}
\value{
A table of cumulative frequency counts etc., including
count, cum, pct, cum_pct
}
\description{
This wraps 4 functions to return 4 tables:
using \code{\link[=colcounter_summary]{colcounter_summary()}}, \code{\link[=colcounter_summary_pct]{colcounter_summary_pct()}},
\code{\link[=colcounter_summary_cum]{colcounter_summary_cum()}}, \code{\link[=colcounter_summary_cum_pct]{colcounter_summary_cum_pct()}}
For another view and text explanations of the findings, see
\code{\link[=count_sites_with_n_high_scores]{count_sites_with_n_high_scores()}}
}
\examples{
    # df <-  bg22[ , names.ej.pctile]
 df <- data.frame(a=rep(80,4),b=rep(93,4), col3=c(49,98,100,100))
 bench <- 5 * (0:20)
 a3 <- colcounter_summary_all(df, bench)
 a3[,'95',]
 a3[,,'cum_pct']
 a3['0',,]; a3[1,,]
 a3[dim(a3)[1],,]
 # a3['12',,]; a3[13,,]
 
 \dontrun{
 barplot(colcounter_summary_cum_pct(pdata, pcuts)[ , '80'],
    ylab='\% of places', xlab='# of indicators at/above threshold',
    main='\% of places with at least N/12 indicators >=80th percentile')

 barplot(colcounter_summary(pdata, pcuts)[2:13 , '95'],
    ylab='# of places', xlab='# of indicators at/above threshold',
    main='# of places with exactly N/12 indicators >=95th percentile')

  # pdata <- ejscreen package file bg22[ , names.e.pctile]
  colcounter_summary_cum_pct(pdata,c(50,80,90,95))
  xs <- 1:12
  plot(x=xs, y=colcounter_summary_cum_pct(pdata, 50)[xs+1],
   type='b', col='gray', ylim=c(0, 100),
    main='\% of places with at least x/12 indicators >=Nth percentile',
     ylab='\% of places', xlab='# of indicators')
  points(xs, colcounter_summary_cum_pct(pdata, 80)[xs+1], type='b', col='blue')
  points(xs, colcounter_summary_cum_pct(pdata, 90)[xs+1], type='b', col='orange')
  points(xs, colcounter_summary_cum_pct(pdata, 95)[xs+1], type='b', col='red')
  legend(x = 'topright', legend = paste0('>= ', c(50, 80, 90, 95),'th percentile'),
   fill = c('gray', 'blue', 'orange', 'red'))

  # pdata <- bg22[ ,  names.ej.pctile]
  colcounter_summary_cum_pct(pdata,c(50,80,90,95))
  xs <- 1:12
  plot(x=xs, y=colcounter_summary_cum_pct(pdata, 50)[xs+1], 
    type='b', col='gray', ylim=c(0, 40),
    main='\% of places with at least x/12 indicators >=Nth percentile', ylab='\% of places', 
    xlab='# of indicators')
  points(xs, colcounter_summary_cum_pct(pdata, 80)[xs+1], type='b', col='blue')
  points(xs, colcounter_summary_cum_pct(pdata, 90)[xs+1], type='b', col='orange')
  points(xs, colcounter_summary_cum_pct(pdata, 95)[xs+1], type='b', col='red')
  legend(x = 'topright', legend = paste0('>= ', c(50, 80, 90, 95),'th percentile'), 
    fill = c('gray', 'blue', 'orange', 'red'))
}

}
\seealso{
\code{\link[=colcounter_summary_all]{colcounter_summary_all()}} \code{\link[=colcounter_summary]{colcounter_summary()}} \code{\link[=colcounter_summary_cum]{colcounter_summary_cum()}} \code{\link[=colcounter_summary_pct]{colcounter_summary_pct()}} \code{\link[=colcounter_summary_cum_pct]{colcounter_summary_cum_pct()}}
}
